﻿<d3:ViewportUIContainer
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:d3="clr-namespace:Microsoft.Research.DynamicDataDisplay.Charts"
		xmlns:d31="http://research.microsoft.com/DynamicDataDisplay/1.0"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
		x:Class="Microsoft.Research.DynamicDataDisplay.Charts.Shapes.DraggablePoint"
		ToolTip="{Binding Position, RelativeSource={RelativeSource Self}}">
	
	<d3:ViewportUIContainer.Resources>
		<Storyboard x:Key="MouseOn" >
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="ellipse1">
				<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="24" KeySpline="0.75,0,0.25,1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="ellipse1">
				<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="24" KeySpline="0.75,0,0.25,1"/>
			</DoubleAnimationUsingKeyFrames>

			
		</Storyboard>
		<Storyboard x:Key="MouseOff" >
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="ellipse1">
				<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="12" KeySpline="0.75,0,0.25,1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="ellipse1">
				<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="12" KeySpline="0.75,0,0.25,1"/>
			</DoubleAnimationUsingKeyFrames>


		</Storyboard>
		<Storyboard x:Key="pulse" RepeatBehavior="Forever">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
				<SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="0.1"/>
				<SplineDoubleKeyFrame KeyTime="0:0:0.6" Value="1"/>
				
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
</d3:ViewportUIContainer.Resources>
	<d3:ViewportUIContainer.Triggers>
		<EventTrigger RoutedEvent="UIElement.MouseEnter">
			<BeginStoryboard x:Name="MouseOn_BeginStoryboard" Storyboard="{StaticResource MouseOn}"/>
		</EventTrigger>
		<EventTrigger RoutedEvent="UIElement.MouseLeave">
			<BeginStoryboard x:Name="MouseOff_BeginStoryboard" Storyboard="{StaticResource MouseOff}"/>
		</EventTrigger>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource pulse}"/>
		</EventTrigger>
</d3:ViewportUIContainer.Triggers>

	

	<Grid Width="50" Height="50">

		<Grid  />

		<Grid >
			<Ellipse x:Name="ellipse1" Width="12" Height="12" Fill="White" Stroke="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/>
			<Ellipse x:Name="ellipse" Width="4" Height="4" Fill="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/>
		</Grid>
	</Grid>
</d3:ViewportUIContainer>
